import request from '@/utils/request'

// 查询应急处置操作流程列表
export function listEmergencyHandleProcess(query) {
  return request({
    url: '/yjcz/emergencyHandleProcess/list',
    method: 'get',
    params: query
  })
}

// 查询应急处置操作流程详细
export function getEmergencyHandleProcess(pkId) {
  return request({
    url: '/yjcz/emergencyHandleProcess/' + pkId,
    method: 'get'
  })
}

// 新增应急处置操作流程
export function addEmergencyHandleProcess(data) {
  return request({
    url: '/yjcz/emergencyHandleProcess',
    method: 'post',
    data: data
  })
}

// 修改应急处置操作流程
export function updateEmergencyHandleProcess(data) {
  return request({
    url: '/yjcz/emergencyHandleProcess',
    method: 'put',
    data: data
  })
}

// 删除应急处置操作流程
export function delEmergencyHandleProcess(pkId) {
  return request({
    url: '/yjcz/emergencyHandleProcess/' + pkId,
    method: 'delete'
  })
}


// 查询应急场景列表
export function listSceneInfo(data) {
  return request({
    url: '/yjcz/emergencyHandleProcess/querySceneList',
    method: 'post',
    data: data
  })
}


// 查询用户列表
export function listUser() {
  return request({
    url: '/yjcz/emergencyHandleProcess/userList',
    method: 'get'
  })
}

// 新增应急处置操作流程
export function addOrUpdateHandleProcess(data) {
  return request({
    url: '/yjcz/fbChannelScene/addOrUpdateHandleProcess',
    method: 'post',
    data: data
  })
}


// 根据场景查询应急流程模板
export function listTemplate(sceneId) {
  return request({
    url: `/yjcz/template/listTemplate/${sceneId}`,
    method: 'get'
  })
}



// 根据主键查询应急处置流程
export function getHandleProcessByFbChannelSceneId(fbChannelSceneId) {
  return request({
    url: `/yjcz/fbChannelScene/${fbChannelSceneId}`,
    method: 'get'
  })
}
